<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2021/1/4
  Time: 13:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>
<%--<%@ page errorPage="error/500.jsp" %>--%>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
<%--  jsp表达式--%>
<%=new Date()%>
<%--  jsp脚本语言--%>
  <%
    int sum=0;
    for(int i=1;i<=100;i++){
      sum+=i;
    }
    out.print("<h1>Sum="+sum+"</h1>");
  %>

  <%
    for(int i=1;i<=5;i++){
  %>
<h1>hi,jsp   <% out.print(i); %>     </h1>

  <%}%>


  <%!
    static{
      System.out.println("静态代码块");
    }

    private int globalvar=0;
    public void he(){
      System.out.println("进入了方法he");
    }

  %>
<%--  <%--%>
<%--  int x=1/0;--%>
<%--  %>--%>
  </body>
</html>
